![]() | SwingOSC is an OpenSoundControl (OSC) server intended for scripting Java(tm), such as to create graphical user interfaces with AWT or Swing classes. It uses the reflection and beans mechanism to dynamically create instances of java classes and control them. A separate set of SuperCollider language classes is included to allow the building of GUIs from within sclang.
SwingOSC is (C)opyright 2005–2008 by Hanns Holger Rutz. All rights reserved. SwingOSC is released under the GNU General Public License and comes with absolutely no warranties. To contact the author, send an email to |
For project status, API and current version, visit www.sciss.de/swingOSC.
For OSC communication, SwingOSC uses the NetUtil library, which is licensed under the GNU Lesser General Public License (LGPL). The compiled library is included, for sourcecode and details visit www.sciss.de/netutil.
SwingOSC uses UDP and TCP network protocols. It allows to create and execute almost any kind of java code on your machine. Therefore, running SwingOSC in a network that can be accessed from outside is a severe security problem, allowing hijacking, information retrieval and massive damage on your machine. You have been warned!
It is strongly advised to launch SwingOSC with the -L option which limits communication to the local computer. Alternatively, make sure your firewall settings are appropriate.
The current version can be downloaded here:
The SuperCollider for Windows built maintained by the IEM Graz already comes with a preconfigured SwingOSC installation (however not always the newest):
Developers can download the lastest version from Subversion (SVN):
> cd <baseDir> > svn co https://swingosc.svn.sourceforge.net/svnroot/swingosc/trunk/ SwingOSC
The subversion download comes in source form and needs to be compiled (see the compilation section below). The regular download already includes a precompiled binary.
SwingOSC is written in Java(tm) and requires a Java runtime environment (JRE) version 1.4 or better. On Mac OS X you already have this runtime. On other platforms you may need to download and install a recent runtime from java.sun.com. You can verify your current java version by opening a terminal and executing the command java -version.
Linux note: There are other free implementations for the Java standard platform, like Apache Harmony and GNU Classpath. Kaffe.org has a list of related things. I have tested SwingOSC only with Sun's and Apple's VM and I don't know whether it runs with those alternatives. Particularly AWT (the GUI base system) is incomplete, so I don't recommend using for example gij which seems to be the default on Debian / Ubuntu. Installing Sun's Java does not imply that you cannot have your current alternative Java installed (see nescivi's posting on this thread for details: www.nabble.com/swingOSC-installation-on-Linux-Ubuntu-7.04-t4638827.html).
SwingOSC_TCP.command and SwingOSC_UDP.command to boot a standard server. As of v0.29 they can be executed out-of-the-box. However, you may wish to customize the SwingOSC options using a text editor such as the TextEdit application. If you cannot double-click these files, select each in the Finder and open the information window (Cmd+I). Choose to open these documents with the Terminal application (located in /Applications/Utilities).To use MovieView.java (i.e. JSCMovieView), you will need the Java Media Framework (JMF) classes from Sun (on Mac OS X use the cross-platform download). Put jmf.jar in your system's classpath, e.g. on Mac OS X that can be /Library/Java/Extensions. I'm hoping to find a better solution for movie playback in the future.
Open a terminal and cd into the SwingOSC folder. Either run the default script by typing sh SwingOSC.sh, or launch with custom options:
> java [java-VM-options] -jar build/SwingOSC.jar [swing-osc-options]
where the VM options are:
-Dswing.defaultlaf=<LookAndFeelClassName> : specify a custom look-and-feel class. e.g. com.birosoft.liquid.LiquidLookAndFeel.-Dapple.awt.brushMetalLook=true : (Mac OS only) use the brushed-metal window skin as known from the Finder and traditional SuperCollider GUI.-Xdock:icon=application.icns : (Mac OS only) use a prettier icon for display in the dock and programme switching screen.-Xdock:name=SwingOSC : (Mac OS only) alternative screen nameand the SwingOSC options are:
-t <port> : use the given TCP port for message reception. The SuperCollider classes assume that you use port 57111!-u <port> : use the given UDP port for message reception. if absent, an arbitrary free port will be picked.-L : use loopback address ("127.0.0.1") for communication. if absent, the local host's IP address is used. when your computer is connected to a network and SwingOSC needs only be accessed from the local computer, make sure you use this option to minimize the security issue mentioned above.
-i : run Swing initialization upon startup. On Mac OS, a terminal app becomes a GUI app with screen menu bar and icon in the Dock, as soon as an AWT or Swing component is created. This initialization can be enforced by using this opton.-h <host:port> : send a [ /swing, "hello", <swingHost>, <swingPort>, <swingProtocol> ] message to the given UDP socket. this kind of manual "bonjour" is used by the SuperCollider classes to detect the startup of the SwingOSC server.if you wish to include custom java classes or libraries, you can either
/classes OSC command (see OSC reference for details).SwingOSC.jar file, add them to the java class path, as shown in the following example which adds the freetts speech libraries (assuming they have been copied to the lib folder):
> java -cp build/SwingOSC.jar:lib/freetts.jar:lib/jsapi.jar de.sciss.swingosc.SwingOSC [swing-osc-options]
Please read the DevelopersNeeded note.
examples folders.OSC-Command-Reference.html provides an introduction to the concept of SwingOSC and explains all commands that the server understands.
The source code can be compiled using Eclipse SDK 3.2+ (www.eclipse.org) and Apache Ant 1.6.5+ (ant.apache.org). You need to install Ant-Contrib as well (first install Ant if you do not have it, then download Ant-Contrib and copy ant-contrib.jar into Ant's lib folder). The Eclipse project file is configured to run the regular Ant build file. You can make a clean build just with Ant from the terminal:
> ant clean jar > ant test
The "test" will just launch SwingOSC so you can see if the build works; you can leave away that task. By default, NetUtil is included in the resulting file build/SwingOSC.jar. If wish to link externally to it, you can build like this:
> ant -Dplain=true clean jar
To compile MovieView.java, you will need to have jmf.jar in your classpath (see requirements sections above). If JMF is not installed, the Ant build will skip the compilation of MovieView.java and you will not be able to use JSCMovieView.
Routine and place short wait statements in the body until no more message dropping occurs.JSCSoundFileView, JSCMovieView, JSCTabbedPane, JSCCheckBoxJFont, JSCTextField, JPenJSCMultiSliderView/classes OSC commandOSCClient.java to SwingClient.javaJSC2DSlider, opacity in JSCCompositeView, focus in JSCSlider), missing classes (SwingDialog), modifications (string operations in JPen)System.out not System.err, so they are visible in SuperCollider's post windownew() and start() in SwingOSC.java public (e.g. to be accessible by Eisenkraut)JSCCompositeView, completions for JSCWindowJSCPlugView, JSCPlugContainerView, JavaObjectJPen, JSCUserView, JSCTextView, fixed JSCHLayoutView and JSCVLayoutView, added mouse, component resize and focus traversal tracking, modified the JMouseBase gui, optimized performance, fixed a lot of bugs.MultiStateButton was moved to the de.sciss.gui package and is slightly modified.JStethoscope / JSCScope / .jscope plusGUIFreqScope by Lance Putnam-h option/field and /fieldr commands/free"toolkit" object assignment which caused the -i option to be ineffective. you can restore the original binding by sending a message [ "/local", \toolkit, [ "/method", "java.awt.Toolkit", \getDefaultToolkit ]]JSCDragSource/Sink/Both supercollider classesRangeSlider and Slider2D classes (+ related SC classes)JMacUGens.sc supercollider class/import package lookup mechanism (not yet accessible though)
java is a trademark of sun microsystems
i think mac os and xcode are trademarks of apple inc
windows is one of microsoft corp
jever is a trademark of some west german beer factory